package com.old.people.service.serviceImp;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.old.people.dao.UserMapper;
import com.old.people.entities.Appraisal;
import com.old.people.entities.Disease;
import com.old.people.entities.OldPeople;
import com.old.people.entities.OrderServiceServicer;
import com.old.people.entities.ServiceServicer;
import com.old.people.service.UserService;
@Service
public class UserServiceImp implements UserService {
	@Autowired
	private UserMapper userMapper;

	@Override
	public OldPeople select(String account_id) {
		return userMapper.select(account_id);
	}

	@Override
	public boolean updateOldpeople(String oldpeople_id, String oldpeople_name, String oldpeople_sex,
			String oldpeople_idcard, String oldpeople_address, String oldpeople_tel, String oldpeople_description,
			String oldpeople_familytel) {
		return userMapper.updateOldpeople(oldpeople_id, oldpeople_name, oldpeople_sex, oldpeople_idcard, oldpeople_address, oldpeople_tel, oldpeople_description, oldpeople_familytel);
	}

	@Override
	public List<Appraisal> getAppraisal(String account_id, Integer begin) {
		return userMapper.getAppraisal(account_id, begin);
	}

	@Override
	public Integer getAppraisalSum(String account_id) {
		return userMapper.getAppraisalSum(account_id);
	}

	@Override
	public List<Disease> getdiseases(String account_id) {
		return userMapper.getdiseases(account_id);
	}

	@Override
	public List<OrderServiceServicer> getOrderServiceServicer(String account_id, Integer begin) {
		return userMapper.getOrderServiceServicer(account_id, begin);
	}

	@Override
	public Integer getOrderServiceServicerSum(String account_id) {
		return userMapper.getOrderServiceServicerSum(account_id);
	}

	@Override
	public boolean updateOrder(String order_id, String order_status) {
		return userMapper.updateOrder(order_id, order_status);
	}

	@Override
	public boolean updateOrders(String order_id, String order_completetime) {
		return userMapper.updateOrders(order_id, order_completetime);
	}

	@Override
	public boolean insertAppraisal(String appraisal_id, String appraisal_grade, String appraisal_content,
			String account_id, String order_id) {
		return userMapper.insertAppraisal(appraisal_id, appraisal_grade, appraisal_content, account_id, order_id);
	}

	@Override
	public List<ServiceServicer> getService(Integer begin) {
		return userMapper.getService(begin);
	}

	@Override
	public Integer getServiceSum() {
		return userMapper.getServiceSum();
	}

	@Override
	public List<ServiceServicer> selectService(String service_name) {
		return userMapper.selectService(service_name);
	}

	@Override
	public boolean insertOrder(String order_id, String order_createtime, String order_scheduledtime,
			String order_completetime, String order_status, String order_price, String servicer_id, String oldpeople_id,
			String account_id) {
		return userMapper.insertOrder(order_id, order_createtime, order_scheduledtime, order_completetime, order_status, order_price, servicer_id, oldpeople_id, account_id);
	}

	@Override
	public String getOldpeopleId(String account_id) {
		return userMapper.getOldpeopleId(account_id);
	}

	@Override
	public boolean insertUserFunds(String funds_id, String funds_type, String funds_amount, String funds_date,
			String account_id) {
		return userMapper.insertUserFunds(funds_id, funds_type, funds_amount, funds_date, account_id);
	}

	@Override
	public String getAccount(String holder_id) {
		return userMapper.getAccount(holder_id);
	}
}
